package dyyx;

import java.util.Properties;

import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.support.PropertiesLoaderUtils;

public class PropertiesLoaderUtilsTest {
	
	public static void main(String[] args) throws Exception {			
		String config = "config.properties";
		// 加载同名的所有配置
		Properties prop = PropertiesLoaderUtils.loadAllProperties(config);
		System.out.println(prop);
		
		Properties prop2 = new Properties();
		// 只加载一个
		PropertiesLoaderUtils.fillProperties(prop2, new ClassPathResource(config));
		System.out.println(prop2);

		
	}
}
